package cn.iocoder.yudao.module.ent.enums.search;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum EntFormTypeEnum {

    TEXT("text"),
    RADIO("radio"),
    CHECKBOX("checkbox"),
    RANGE("range"),
    RANGE_DATE("range_date"),
    SELECT("select"),
    SEARCHBOX("searchbox");

    private final String type;

    public static EntFormTypeEnum getEnum(String type) {
        return Arrays.stream(values()).filter(x -> x.type.equals(type)).findFirst().get();
    }

}
